package com.sicheng.lc.周赛.分类.模拟;

/**
 * @author zsc
 * @version 1.0
 * @date 2022/6/29 14:24
 */
public class 找到和为给定整数的三个连续整数 {
    //https://leetcode.cn/problems/find-three-consecutive-integers-that-sum-to-a-given-number/
    public long[] sumOfThree(long num) {
        if (num % 3 == 0) {
            long[] res = new long[3];
            res[1] = num / 3;
            res[0] = res[1] - 1;
            res[2] = res[1] + 1;
            return res;
        }
        return new long[]{};
    }
}
